﻿Module UI
    Public Sub FormatDataGrid(ByRef dgv As DataGridView)
        dgv.AllowUserToAddRows = False
        dgv.AllowUserToDeleteRows = False
        dgv.ReadOnly = True
        dgv.RowHeadersVisible = False
        dgv.AllowUserToResizeRows = False
        ' dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.LightGray
        ' dgv.CellBorderStyle = DataGridViewCellBorderStyle.None
        dgv.RowTemplate.Height = 27
        dgv.BackgroundColor = Color.WhiteSmoke
        dgv.SelectionMode = DataGridViewSelectionMode.FullRowSelect
        dgv.MultiSelect = False
        With dgv
            .EnableHeadersVisualStyles = False
            '.Font = New Font("Khmer OS", 9)
        End With

        Dim columnHeaderStyle As New DataGridViewCellStyle
        columnHeaderStyle.BackColor = Color.Lavender
        columnHeaderStyle.ForeColor = Color.Maroon
        columnHeaderStyle.Font = _
            New Font("Khmer OS Bokor", 10) ', FontStyle.Bold)
        dgv.ColumnHeadersDefaultCellStyle = columnHeaderStyle
    End Sub
End Module
